extends Node

var keys={"debug":true,"accept":false,"cancel":false,"quit":false,"pause":false,"options":false,"mouse_x":0,"mouse_y":0,"click":false,"up":false,"down":false,"right":false,"left":false}

func _ready():
	pass

func _input(event):
	if event is InputEventMouseButton:
		keys.click=(event.button_index==BUTTON_LEFT&&event.pressed)

func _process(_delta):
	pass
	if(Input.is_action_just_pressed("debug")):
		keys.debug=!keys.debug
	if(Input.is_action_just_pressed("pause")):
		keys.pause=!keys.pause
	if(Input.is_action_just_pressed("options")):
		keys.options=!keys.options
	keys.accept=Input.is_action_just_pressed("ui_accept")
	keys.cancel=Input.is_action_just_pressed("ui_cancel")
	keys.quit=Input.is_action_just_pressed("ui_end")
	keys.up=Input.is_action_pressed("ui_up")
	keys.down=Input.is_action_pressed("ui_down")
	keys.right=Input.is_action_pressed("ui_right")
	keys.left=Input.is_action_pressed("ui_left")
	keys.mouse_x=int(get_viewport().get_mouse_position().x)
	keys.mouse_y=int(get_viewport().get_mouse_position().y)
